/**
 * dbms-sjtu
 * TableInfo.java created at Jul 22, 2011
 */
package dbms.record;

import java.util.ArrayList;
import java.util.List;

/**
 * @author weapon
 *
 */
public class TableInfo {
	private String tableName;
	private Schema tableSchema;
	/**
	 * the length of this table writing on the disk file.
	 */
	//private int recordLength;
	
	/**
	 * this first page number of the database file
	 */
	private int firstPage;
	
	/**
	 * the row id on master table
	 */
	private int rowId;
	
	public List<Object> primaryKeyIndex;
	
	public  TableInfo(String tableName, Schema tableSchema) {
		this.tableName = tableName;
		this.tableSchema = tableSchema;
		
		primaryKeyIndex = new ArrayList<Object>();
	}
	
	public String getTableName(){
		return this.tableName;
	}
	
	public Schema getTableSchema(){
		return this.tableSchema;
	}
	
	public int getRowId(){
		return this.rowId;
	}
	
	public int getFirstPage(){
		return this.firstPage;
	}
	
	public void setFirstPage(int firstpage){
		this.firstPage = firstpage;
	}
	
	public void setRowId(int rowId){
		this.rowId = rowId;
	}
}
